/**
 *
 */
package cn.hg.jfsa.manage.route;

import com.jfinal.config.Routes;

import cn.hg.jfsa.manage.controller.DashboardController;
import cn.hg.jfsa.manage.controller.ManageIndexController;
import cn.hg.jfsa.manage.controller.UploadController;
import cn.hg.jfsa.manage.controller.module.ad.AdController;
import cn.hg.jfsa.manage.controller.module.ad.AdPlaceController;
import cn.hg.jfsa.manage.controller.module.award.AwardController;
import cn.hg.jfsa.manage.controller.module.cases.CasesCategoryController;
import cn.hg.jfsa.manage.controller.module.cases.CasesController;
import cn.hg.jfsa.manage.controller.module.column.ColumnController;
import cn.hg.jfsa.manage.controller.module.contactRequest.ContactRequestController;
import cn.hg.jfsa.manage.controller.module.doc.DocCategoryController;
import cn.hg.jfsa.manage.controller.module.doc.DocController;
import cn.hg.jfsa.manage.controller.module.goods.AttrCategoryController;
import cn.hg.jfsa.manage.controller.module.goods.AttrItemController;
import cn.hg.jfsa.manage.controller.module.goods.GoodsCategoryController;
import cn.hg.jfsa.manage.controller.module.goods.GoodsController;
import cn.hg.jfsa.manage.controller.module.goods.GoodsTypeController;
import cn.hg.jfsa.manage.controller.module.link.LinkCategoryController;
import cn.hg.jfsa.manage.controller.module.link.LinkController;
import cn.hg.jfsa.manage.controller.module.news.NewsCategoryController;
import cn.hg.jfsa.manage.controller.module.news.NewsController;
import cn.hg.jfsa.manage.controller.module.pages.PagesController;
import cn.hg.jfsa.manage.controller.module.recruit.RecruitController;
import cn.hg.jfsa.manage.controller.module.service.ServiceCategoryController;
import cn.hg.jfsa.manage.controller.module.service.ServiceController;
import cn.hg.jfsa.manage.controller.module.tag.TagController;
import cn.hg.jfsa.manage.controller.module.team.TeamController;
import cn.hg.jfsa.manage.controller.system.JfsaActionLogController;
import cn.hg.jfsa.manage.controller.system.JfsaAdminController;
import cn.hg.jfsa.manage.controller.system.JfsaCdnOptionController;
import cn.hg.jfsa.manage.controller.system.JfsaDictController;
import cn.hg.jfsa.manage.controller.system.JfsaFilesController;
import cn.hg.jfsa.manage.controller.system.JfsaOptionController;
import cn.hg.jfsa.manage.controller.system.JfsaOrgController;
import cn.hg.jfsa.manage.controller.system.JfsaResourceController;
import cn.hg.jfsa.manage.controller.system.JfsaRoleController;
import cn.hg.jfsa.manage.controller.system.JfsaThemeController;
import cn.hg.jfsa.manage.controller.system.JfsaThemeEditController;
import cn.hg.jfsa.manage.controller.system.JfsaThemeOptionController;
import cn.hg.jfsa.manage.interceptor.AuthInterceptor;
import cn.hg.jfsa.manage.interceptor.LoginInterceptor;

/**
 * @author golly
 */
public class ManageRoutes extends Routes {

	/*
	 * (non-Javadoc)
	 * @see com.jfinal.config.Routes#config()
	 */
	@Override
	public void config () {
		// 各种拦截器
		this.addInterceptor(new LoginInterceptor()); // 登录拦截放前面
		this.addInterceptor(new AuthInterceptor()); // 权限验证拦截
		// 公共资源控制器
		this.add("/manage", ManageIndexController.class);
		this.add("/manage/dashboard", DashboardController.class, "/manage/system/dashboard");
		this.add("/manage/upload", UploadController.class);
		// 各类基本管理控制器
		this.add("/manage/actionLog", JfsaActionLogController.class, "/manage/system/actionLog");
		this.add("/manage/admin", JfsaAdminController.class, "/manage/system/admin");
		this.add("/manage/dict", JfsaDictController.class, "/manage/system/dict");
		this.add("/manage/files", JfsaFilesController.class, "/manage/system/files");
		this.add("/manage/option", JfsaOptionController.class, "/manage/system/option");
		this.add("/manage/org", JfsaOrgController.class, "/manage/system/org");
		this.add("/manage/resource", JfsaResourceController.class, "/manage/system/resource");
		this.add("/manage/role", JfsaRoleController.class, "/manage/system/role");
		this.add("/manage/theme", JfsaThemeController.class, "/manage/system/theme");
		this.add("/manage/theme/edit", JfsaThemeEditController.class, "/manage/system/theme/edit");
		this.add("/manage/theme/option", JfsaThemeOptionController.class, "/manage/system/theme/option");
		this.add("/manage/cdnOption", JfsaCdnOptionController.class, "/manage/system/cdnOption");
		// ------------------------------------------------------------------------
		// 业务模块控制器
		this.add("/manage/ad", AdController.class, "/manage/module/ad");
		this.add("/manage/adPlace", AdPlaceController.class, "/manage/module/adPlace");
		this.add("/manage/award", AwardController.class, "/manage/module/award");
		this.add("/manage/attrCategory", AttrCategoryController.class, "/manage/module/attrCategory");
		this.add("/manage/attrItem", AttrItemController.class, "/manage/module/attrItem");
		this.add("/manage/cases", CasesController.class, "/manage/module/cases");
		this.add("/manage/casesCategory", CasesCategoryController.class, "/manage/module/casesCategory");
		this.add("/manage/column", ColumnController.class, "/manage/module/column");
		this.add("/manage/doc", DocController.class, "/manage/module/doc");
		this.add("/manage/docCategory", DocCategoryController.class, "/manage/module/docCategory");
		this.add("/manage/goods", GoodsController.class, "/manage/module/goods");
		this.add("/manage/goodsCategory", GoodsCategoryController.class, "/manage/module/goodsCategory");
		this.add("/manage/goodsType", GoodsTypeController.class, "/manage/module/goodsType");
		this.add("/manage/link", LinkController.class, "/manage/module/link");
		this.add("/manage/linkCategory", LinkCategoryController.class, "/manage/module/linkCategory");
		this.add("/manage/news", NewsController.class, "/manage/module/news");
		this.add("/manage/newsCategory", NewsCategoryController.class, "/manage/module/newsCategory");
		this.add("/manage/pages", PagesController.class, "/manage/module/pages");
		this.add("/manage/recruit", RecruitController.class, "/manage/module/recruit");
		this.add("/manage/service", ServiceController.class, "/manage/module/service");
		this.add("/manage/serviceCategory", ServiceCategoryController.class, "/manage/module/serviceCategory");
		this.add("/manage/tag", TagController.class, "/manage/module/tag");
		this.add("/manage/team", TeamController.class, "/manage/module/team");
		this.add("/manage/contactRequest", ContactRequestController.class, "/manage/module/contactRequest");
	}

}
